<?php

include('../../include/functions.inc.php');
include('../../include/report.inc.php');

$report = new Report;

$report->tabla = "cllg_factura";
$report->campos = array("SERIE" => "SERIE", "NUMERO" => "NUMERO", "FECHA" => "FECHA", "TIPO_PAGO" => "FORMA PAGO", "FK_STUDENT" => "ALUMNO"
    , "NIT" => "NIT", "NOMBRE" => "NOMBRE", "SUBTOTAL" => "SUBTOTAL", "TOTAL" => "TOTAL");

$report->requireFilter = false;
$report->ajax = true;
$report->sumArea = true;
$report->sumFields = array("TOTAL IVA" => "IVA", "TOTAL FACTURADO" => "TOTAL");

$campo = new FiltroCampo;
$campo->nombre = "FK_ENTITY";
$campo->defValue = $user->entity;
$report->filtroFijo[] = $campo;

$campo = new FiltroCampo;
$campo->specialCriteria = "STATUS=1 AND FECHA BETWEEN " . sqlValue(getParam("f1"), "date")
        . " AND " . sqlValue(getParam("f2"), "date");
$report->filtroFijo[] = $campo;

$report->preLoaded = true;
$report->titulo = "Reporte Facturacion";
$_SESSION[$report->sessionName] = serialize($report);
$report->ready();
?>
